include( 'shared.lua' )
include( 'cl_effects.lua' )
include( 'cl_scoreboard.lua' )
include( 'cl_hud.lua' )
include( 'cl_hint.lua' )
	
function showTeamMenu()

	local TeamMenu = vgui.Create( "DFrame" )
	TeamMenu:SetPos( (ScrW()/2) - 168 , (ScrH()/2) - 69 )
	TeamMenu:SetSize( 336, 139 )
	
	TeamMenu:SetTitle( "Pick a team!" ) 
	TeamMenu:SetVisible( true ) 
	TeamMenu:ShowCloseButton( false )
	TeamMenu:MakePopup()
	
	local TeamPanel = vgui.Create( "DPanel", TeamMenu )
	TeamPanel:SetPos( 5, 25 )
	TeamPanel:SetSize( 326, 105 )
	TeamPanel.Paint = function()
		surface.SetDrawColor( 50, 50, 50, 255 )
		surface.DrawRect( 0, 0, TeamPanel:GetWide(), TeamPanel:GetTall() )
	end
	
	local RebelButton = vgui.Create( "DImageButton", TeamPanel)
	RebelButton:SetPos( 25, 25 )
	RebelButton:SetMaterial( "warballs/rebels" )
	RebelButton:SizeToContents()
	RebelButton.DoClick = function()
        TeamMenu:Close()
		LocalPlayer():ConCommand("warballs_becomerebel")
    end
	
	local AllianceButton = vgui.Create( "DImageButton", TeamPanel)
	AllianceButton:SetPos( 178, 25 )
	AllianceButton:SetMaterial( "warballs/alliance" )
	AllianceButton:SizeToContents()
	AllianceButton.DoClick = function()
        TeamMenu:Close()
		LocalPlayer():ConCommand("warballs_becomealliance")
    end
	
end
concommand.Add("warballs_teammenu", showTeamMenu)
